import java.io.*;
public class Pond implements Serializable {
    private Duck duck = new Duck();
    public static void main(String[] args)
    {
    	Pond myPond = new Pond();
    	try
    	{
    		FileOutputStream fs = new FileOutputStream("Pond1.ser");
    		ObjectOutputStream os = new ObjectOutputStream(fs);
    		
    		os.writeObject(myPond);
    		os.close();
    	}
    	catch(Exception ex)
    	{
    		ex.printStackTrace();
    	}
    }
}

class Duck implements Serializable
{
	int a = 5;
	int b = 5;
	public Duck()
	{
		a = 10; 
		b = 20;
	}
}
